package com.example.demo.validation.dto;

import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import lombok.RequiredArgsConstructor;

import lombok.extern.slf4j.Slf4j;

/**
 * @author jiangjinwu
 * @version 1.0
 * @since 2025/10/4 10:36
 */

@Slf4j
@Data
public class ConfigFormDTO {
  private Long id;
  private String interfaceName;
  private String description;
  private Boolean enabled = true;
  private List<RuleFormDTO> rules = new ArrayList<>();

  // 用于表单绑定
  public void setRules(List<RuleFormDTO> rules) {
    this.rules = rules != null ? rules : new ArrayList<>();
  }
}
